<h3><?php echo Araclar::yaz("Mesaj Kutusu","Message Box"); ?></h3>
<table width="100%">
	<tr>
		<td>
			<b><?php echo Araclar::yaz("Giden Mesajlar","Sent Messages"); ?></b>
		</td>
		<td align="right" width="150px">
			<?php echo "<a href='".Yii::app()->createUrl('yonetici/gelen')."'>".Araclar::yaz("Gelen Mesajlar","Inbox")."</a>"; ?>
		</td>
		<td align="right" width="150px">
			<?php echo "<a href='".Yii::app()->createUrl('yonetici/yeni')."'>".Araclar::yaz("Yeni Mesaj","Compose")."</a>"; ?>
		</td>
	</tr>
</table>

<?php
$dataProvider=new CActiveDataProvider('Mesajlar', array(
	'criteria'=>array(
		'condition'=>'kimden=:kimden AND sil=0',
		'params'=>array('kimden'=>Yii::app()->user->getId()),
		'order'=>'gonderme_zamani',
	),
	'pagination'=>array(
		'pageSize'=>20,
	),
));
$this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'talep-grid',
	'dataProvider'=>$dataProvider,
//	'filter'=>$model,
	'summaryText'=>'',//{count} sonuçtan {start}-{end} arası gösterilmektedir',
	'selectableRows'=>0,
	'columns'=>array(
		array(
			'class'=>'CDataColumn',
			'header'=>Araclar::yaz('Kime','To'),
			'value'=>'Araclar::kullaniciAdiGetir($data["kime"])',
		),
		'baslik',
		array(
			'class'=>'CButtonColumn',
			'template'=>'{oku}',
			'header'=>Araclar::yaz('Oku','Read'),
			'htmlOptions'=>array('width'=>'120px'),
			'buttons' => array(
				'oku'=>array(
					'label'=>'Oku',
					'url'=>'"?eylem=oku&mesajlar_id=".$data["id"]',
					'imageUrl'=>"/images/simge_oku".Araclar::dosyaDilUzanti().".png",
				),
			),
		),
	),
));				
?>


